prepere to refactoring auth