Refactor Authentication features