Refactoring UserController by extracting the authentication code into own method