Add JS to create token on form submit