added isLoggedIn