Modified loggedIn and logout functions.