some helper middlewares for express apps