@BRT.Logout()

Logs the web user out of the Brick River system

This Helper should be included in the Layout linked to secure Pages.  The most typical use is to evaluate the query string for a logout event and then call the @BRT.Logout() Helper and redirect the user to a different page.
The following is an example of a Layout that uses @BRT.Logout() and redirects to the 'comebacksoon'  page.  The Layout places a 'Logout' button at the top of each page which sets a querystring of '/?logout=logout'.
@functions{
    protected EngineRecord _user = null;    
    public override void InitializePage() {
      BRT.LoginAs(viewId:"People");
        base.InitializePage();
        if (Request.QueryString["logout"] == "logout") {
            @BRT.Logout();    
            Response.Redirect("/comebacksoon");
        }
        else
        {
            _user = BRT.UserRecord(viewId:"People", fields: new[] {"FirstName","LastName","Username"});     
        }   
    }
}
<div>
    @if(BRT.RenderContext.IsDesign) {
        @RenderBody()
    } else if (_user == null) {
      if(Request.Friendly== "securepagehelp"){
        @BRT.LoginHelp(viewId:"People");
      } else {
             <div><h2>Welcome to the Secure Portal</h2></div>
             <p>Please log in to proceed</p>
         <div>
             @BRT.LoginForm(viewId:"People")
            <div><br /><a href="securepagehelp">Need Help Logging in? </a></div>
         </div>  
        }
    } else {
        <div>You are logged into the members area.
        <input type="button" onclick="self.location = '/@Request.Friendly?logout=logout'" value="Logout"></div>
        @RenderBody()
    }                
</div>
This Helper accepts no parameters.