Fixed bug where user doesn't log out