Add middleware to AppKernel