Fixed bug with User.loggedIn