Refactor getting login user information.