@inject NavigationManager Nav

@code {
    protected override void OnInitialized()
    {
        var returnUrl = Uri.EscapeDataString(Nav.Uri);
        Nav.NavigateTo($"/login?returnUrl={returnUrl}", forceLoad: true);
    }
}
