require messages as a module dependency in auth middleware