Fix issues in user.js