Added user logged out check