fixed loggedIn function for sidebar login/logout