auth section refactoring