update login & register js