turn current user middleware into a module.