Add impersonation middleware.