added messages and user middleware
a merge