Added loggedIn to