Updating user.js

Correcting errors with mongoose