update some js code for user login