Fix authentication and authorization