Authentication Refactoring