Added mongodb and changes users api to use the database