user: extract get user session logic out from UserInformation so other functions can use it
user: return an internal server error when trying to get user information and we are authorized but still got an error