Auth protocol refactoring