diff --git a/lib/AccountManager/App.pm b/lib/AccountManager/App.pm
index c31c61f37372a5e8b9928342c641c7c442ead0e7..63f6f47f08cced4a27f8edc9a0a52a7fc19f7e78 100644
--- a/lib/AccountManager/App.pm
+++ b/lib/AccountManager/App.pm
@@ -183,6 +183,7 @@ sub respond {
 
     $in{data}->{app} = {
         url           => $ENV{SCRIPT_NAME},
+        login_url     => $self->{configuration}->{app}->{login_url},
         name          => $self->{configuration}->{app}->{name},
         support_email => $self->{configuration}->{app}->{support_email},
         version       => $version,
diff --git a/templates/web/edugain/home.tt2.html b/templates/web/edugain/home.tt2.html
index 86a0eac2c462d768297a92aace14f065eb0f1540..c4b5d8302d729a4d32f24dfcdc0fc50f14408782 100644
--- a/templates/web/edugain/home.tt2.html
+++ b/templates/web/edugain/home.tt2.html
@@ -9,6 +9,6 @@
 
 <h2>[% lh.maketext("Get started") %]</h2>
 <p>[% lh.maketext("To start testing your own services, start by selecting one your are administrator for.") %]</p>
-<p class="text-center"><a href="[% app.url %]?action=select_federation" class="button">[% lh.maketext("Get started") %]</a></p>
+<p class="text-center"><a href="[% app.login_url %]?target=[% app.url %]%3Faction%3Dselect_federation" class="button">[% lh.maketext("Get started") %]</a></p>
 
 [% END %]
diff --git a/templates/web/renater/home.tt2.html b/templates/web/renater/home.tt2.html
index ede31930b9d493129d5db2cf5e60d9741ca41512..dde4a7b91d3d1542280e570ca1e458be54a21240 100644
--- a/templates/web/renater/home.tt2.html
+++ b/templates/web/renater/home.tt2.html
@@ -9,6 +9,6 @@
 
 <h2>[% lh.maketext("Get started") %]</h2>
 <p>[% lh.maketext("To start testing your own services, start by selecting one your are administrator for.") %]</p>
-<p class="text-center"><a href="[% app.url %]?action=select_federation" class="button">[% lh.maketext("Get started") %]</a></p>
+<p class="text-center"><a href="[% app.login_url %]?target=[% app.url %]%3Faction%3Dselect_federation" class="button">[% lh.maketext("Get started") %]</a></p>
 
 [% END %]