changed isLoggedIn