API endpoint for retrieving the current user