update javascript for register page