Fixed some errors in user.js model