separate js file from register.html