User: Refactoring authenticate