Use MongoDB to store chat messages