Hi Carlos,
If you haven't found a solution yet, you can maybe try this copying on login.html
<head>
<script>
const returnURL = encodeURIComponent(window.location.search + window.location.hash);
self.location = '/oauth/v2/login?cont=index.html' ;
</script>
</head>
Kind regards,
Yusuf