fixed mongodb interactions for users database