So, just a thought the old code logged in although the redirect-to-wanted-page did not work, so is it the way the controller work since it now don´t want to login, because the login should redirect to the /home
if there is not parameter, right? Now that said under you find the full route for my site. I have no idea of how to get the location
parameters in there. 
Here is my complete route setup:
// Routes by Sonja! :) Thank you!
c::set('routes', [
// AMP pages for blog/articles
[
'pattern' => '(:any)/articles/(:any)/amp',
'action' => function($lang, $article) {
$page = page('articles/' . $article);
site()->visit($page, $lang);
$kirby = kirby();
$data = [
'kirby' => $kirby,
'site' => $kirby->site(),
'page' => $kirby->site()->index()->find('articles/'.$article)
];
return new Response(tpl::load(kirby()->roots()->templates() . DS . 'amp.php', $data), 'html', 200);
}
],
// Logout route
[
'pattern' => 'en/logout',
'action' => function () {
if ($user = site()->user()) $user->logout();
go('en/login');
}
],
[
'pattern' => 'br/logout',
'action' => function () {
if ($user = site()->user()) $user->logout();
go('br/login');
}
],
// Omit routes EN
[
'pattern' => 'en/(:any)',
'action' => function($uid) {
$site = site();
$lang = kirby()->route->lang;
$page = $site->visit($uid, $lang);
if($page === $site->errorPage()) $page = $site->visit('articles/' . $uid, $lang);
if($page === $site->errorPage()) $page = $site->visit('lander/' . $uid, $lang);
if($page === $site->errorPage()) $page = $site->visit('legacy/' . $uid, $lang);
if($page === $site->errorPage()) $page = $site->visit('link/' . $uid, $lang);
return $page;
},
'lang' => 'en'
],
// Omit routes BR
[
'pattern' => 'br/(:any)',
'action' => function($uid) {
$site = site();
$lang = kirby()->route->lang;
$page = $site->visit($uid, $lang);
if($page === $site->errorPage()) $page = $site->visit('articles/' . $uid, $lang);
if($page === $site->errorPage()) $page = $site->visit('lander/' . $uid, $lang);
if($page === $site->errorPage()) $page = $site->visit('legacy/' . $uid, $lang);
if($page === $site->errorPage()) $page = $site->visit('link/' . $uid, $lang);
return $page;
},
'lang' => 'br'
],
// Redirect the visitor to the omitted URL.
[
'pattern' => ['(:any)/legacy/(:any)', '(:any)/articles/(:any)', '(:any)/link/(:any)', '(:any)/lander/(:any)'],
'action' => function($lang,$uid) {
go($lang.'/'.$uid);
}
],
// Improved route for missing language code - The fallback
[
'pattern' => '(:any)',
'action' => function($pattern) {
$langCodes = array_column(c::get('languages'), 'code');
if(in_array($pattern, $langCodes)) {
return site()->visit('/', $pattern);
} elseif ($page = site()->visit('', 'br')->parent()->index()->findBy('uid', $pattern)) {
return go('br'.'/'.$pattern);
}
elseif ($page = site()->visit('', 'en')->parent()->index()->findBy('urlkey', $pattern)) {
return go('en'.'/'.$pattern);
} else {
go('error');
}
}
],
]);
// Corrected version for not braking hopefully.
if(function_exists('panel')) {
panel()->routes([
[
'pattern' => '(logout)', // the trick here is the parens around the route pattern
'method' => 'GET|POST',
'filter' => array('auth'),
'action' => function() {
if($user = panel()->user()) {
$user->logout();
}
go('/');
},
]
]);
}