Refactored AUthorization module