before_dispatch and after_dispatch implemented in RequestHandler.