Add logout function and moved isLoggedIn function
snap the card back if user is not logged in