Authorization refactored