diff --git a/Views/Account/Login.cshtml b/Views/Account/Login.cshtml index 8a06626..4c7d7d1 100644 --- a/Views/Account/Login.cshtml +++ b/Views/Account/Login.cshtml @@ -55,7 +55,8 @@ document.getElementById('loginForm').addEventListener('submit', async (e) => { }); if (response.ok) { - window.location.href = '/'; + let returnUrl = new URLSearchParams(window.location.search).get('ReturnUrl'); + window.location.href = returnUrl ? returnUrl : '/'; } else { const error = await response.json(); messageDiv.innerHTML = `
${error.message}
`;