refactoring and adding functionality for authorization