Adding the authorizeCurrentUser functionality to the API