Its not actually logged out but rather you are still using the cached page used by guests. However, you will see a brown notice in the footer stating the logged-in user has changed and you are advised to reload.
You should reload or hard reload (SHIFT + F5) and this will result the system to refresh and get in your account.