Add unit test for user.js