Starting to add javascript to the register function