@page
@using Marechai.Database.Models
@attribute [IgnoreAntiforgeryToken]
@inject SignInManager<ApplicationUser> SignInManager

@functions {

    public async Task<IActionResult> OnPost()
    {
        if (SignInManager.IsSignedIn(User))
        {
            await SignInManager.SignOutAsync();
        }

        return Redirect("~/");
    }

}