added message middleware (required for admin)