Fix setting loggedInUser