implemented isLoggedIn()