Register functionality refactored. We have now the script in register.js outside ot the HTML and seperated from the helpers.js