change db to mongodb with user authentication working