Refactoring using decorator for requests that require authentication.