﻿<div class="user-display">
    @if (!User.Identity.IsAuthenticated)
    {
        <span class="welcome"><a href="@Url.LogOn()">Log On</a></span>
        <a href="@Url.Action(MVC.Users.Register())" class="register">Register</a>
    }
    else
    {
        <span class="welcome"><a href="@Url.Action(MVC.Users.Account())">@User.Identity.Name</a></span>
        <span class="user-actions">
            <a href="@Url.LogOff()">Log Off</a> 
        </span>
    }
</div>
﻿<div class="user-display">
    @if (!User.Identity.IsAuthenticated)
    {
        <span class="welcome">@Html.ActionLink("Log On", "LogOn", "Authentication", new { returnUrl = Request.RequestContext.HttpContext.Request.RawUrl }, null)</span>
        <a href="@Url.Action(MVC.Users.Register())" class="register">Register</a>
    }
    else
    {
        <span class="welcome"><a href="@Url.Action(MVC.Users.Account())">@User.Identity.Name</a></span>
        <span class="user-actions">
            <a href="@Url.LogOff()">Log Off</a> 
        </span>
    }
</div>
Support ReturnUrl to public pages
Support ReturnUrl to public pages
