Externalize method to retrieve the logged in user in the API