added some db access code

users and messages
MongoDB