Refactoring auth pages