made changes to main.js
made changes to register.html to echo values back when there are errors