Added authorization middleware.