diff --git a/rhodecode/templates/base/base.html b/rhodecode/templates/base/base.html
--- a/rhodecode/templates/base/base.html
+++ b/rhodecode/templates/base/base.html
@@ -297,7 +297,7 @@
%if c.rhodecode_user.username == h.DEFAULT_USER:
${_('Sign in to your account')}
- ${h.form(h.url('login_home',came_from=h.url.current()), needs_csrf_token=False)}
+ ${h.form(h.route_path('login', _query={'came_from': h.url.current()}), needs_csrf_token=False)}