diff --git a/rhodecode/templates/login.html b/rhodecode/templates/login.html
--- a/rhodecode/templates/login.html
+++ b/rhodecode/templates/login.html
@@ -34,21 +34,35 @@
${_('Sign In')}
%if h.HasPermissionAny('hg.admin', 'hg.register.auto_activate', 'hg.register.manual_activate')():
- ${h.link_to(_("Go to the registration page to create a new account."),h.url('register'))}
+ ${h.link_to(_("Go to the registration page to create a new account."), request.route_path('register'))}
%endif
+ <%block name="below_login_button" />
diff --git a/rhodecode/templates/register.html b/rhodecode/templates/register.html
--- a/rhodecode/templates/register.html
+++ b/rhodecode/templates/register.html
@@ -33,56 +33,91 @@
${_('Create an account')}
- ${h.link_to(_("Go to the login page to sign in with an existing account."),h.url('login'))}
+ ${h.link_to(_("Go to the login page to sign in with an existing account."), request.route_path('login'))}
- ${h.form(url('register'), needs_csrf_token= False)}
+ ${h.form(request.route_path('register'), needs_csrf_token=False)}
+
- ${h.text('username', c.form_data.get('username'))}
+ ${h.text('username', defaults.get('username'))}
+ %if 'username' in errors:
+
${errors.get('username')}
+
+ %endif
+
- ${h.password('password', c.form_data.get('password'))}
-
- ${h.password('password_confirmation', c.form_data.get('password'))}
+ ${h.password('password', defaults.get('password'))}
+ %if 'password' in errors:
+
${errors.get('password')}
+
+ %endif
+
+
+ ${h.password('password_confirmation', defaults.get('password_confirmation'))}
+ %if 'password_confirmation' in errors:
+
${errors.get('password_confirmation')}
+
+ %endif
+
- ${h.text('firstname')}
+ ${h.text('firstname', defaults.get('firstname'))}
+ %if 'firstname' in errors:
+
${errors.get('firstname')}
+
+ %endif
+
- ${h.text('lastname')}
+ ${h.text('lastname', defaults.get('lastname'))}
+ %if 'lastname' in errors:
+
${errors.get('lastname')}
+
+ %endif
+
- ${h.text('email', c.form_data.get('email'))}
+ ${h.text('email', defaults.get('email'))}
+ %if 'email' in errors:
+
${errors.get('email')}
+
+ %endif
- %if c.captcha_active:
+ %if captcha_active:
-
+
${h.hidden('recaptcha_field')}
+ %if 'recaptcha_field' in errors:
+
${errors.get('recaptcha_field')}
+
+ %endif
%endif
- %if not c.auto_active:
+ %if not auto_active:
${_('Account activation requires admin approval.')}
%endif
- ${c.register_message|n}
+ ${register_message|n}
${h.submit('sign_up',_('Create Account'),class_="btn sign-in")}
${h.end_form()}
+ <%block name="below_register_button" />
-%if c.captcha_active:
+%if captcha_active:
%endif