Set loggedIn take a user as parameter