add user login cookie and test
add some function to User.js