Added isLoggedIn