APY-66: General service for authentication

Put auth directives/services into separate modules.