@if (Context.User.Identity.IsAuthenticated)
{
    <li class="nav-item">
        <a class="nav-link text-capitalize" asp-area="" asp-controller="Account" asp-action="Logout" 
           style="color: blue">@Context.User.Identity.Name - Logout</a>
    </li>
}
else
{
    <li class="nav-item">
        <a class="nav-link text-capitalize" asp-area="" asp-controller="Account" asp-action="Login"
           style="color: blue">Login</a>
    </li>
}