Completed migration of user db code to mongoose