Power register.html with javascript

Due to previous changes in register.html, register.js is yet to revise.