Fixed register.html.template bugs