Fix bug in logout
Use message collection instead of storing them into user collection