Add two custom middlewares.