Using mongodb to save chats