retrieving user object from api when user logs in