<ul class="nav pull-right">
@if (Request.IsAuthenticated)
{
    <li id="account-nav">
        @Html.ActionLink(User.Identity.Name, "Manage", "Account", null, new {@class = "username", title = "Manage"})
    </li>
    <li>
        @using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new {id = "form-logout"}))
        {
            @Html.AntiForgeryToken()
            <button type="submit" class="btn-link">
                Log Off
            </button>
        }
    </li>
}
else
{
    <li>
        @Html.ActionLink("Login", "Login", "Account", null, new {title = "Login"})
    </li>
}
</ul>