@if (ViewBag.IsLoggedIn)
{
    using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm", @class = "navbar-right" }))
    {
        @Html.AntiForgeryToken()

        <ul class="nav navbar-nav navbar-right">
            @*<li>
                @Html.ActionLink("¡Hola, " + User.Identity.GetUserName() + "!", "UsuariosConfig", "Dashboard")
            </li>*@
            <li><a href="javascript:document.getElementById('logoutForm').submit()">Cerrar sesión</a></li>
        </ul>
    }
}
else
{
    <ul class="nav navbar-nav navbar-right">
        <li>@Html.ActionLink("Iniciar sesión", "Login", "Account", routeValues: null, htmlAttributes: new { @class = "navText", id = "loginLink" })</li>
    </ul>
}