Updated register controller and html file to generate POST request