anchor.diff:              | Choice1Of2 path -> path
               | _ -> Path.home
           Redirection.FOUND path)
  +
  +let loggedOn f_success =
  +    Auth.authenticate
  +        Cookie.CookieLife.Session
  +        false
  +        (fun () -> Choice2Of2(redirectWithReturnPath Path.Account.logon))
  +        (fun _ -> Choice2Of2 reset)
  +        f_success
  +
  +let admin f_success =
  +    loggedOn (session (function
  +        | UserLoggedOn { Role = "admin" } -> f_success
  +        | UserLoggedOn _ -> FORBIDDEN "Only for admin"
  +        | _ -> UNAUTHORIZED "Not logged in"
  +    ))
   
   let html container =
       OK (View.index container)
  
positive.code: open System
  
  open Suave
  open Suave.Form
  open Suave.Http
  open Suave.Http.Successful
  
negative.code:     | Some state -> setF state
      | None -> never)
  
  let reset =
      unsetPair Auth.SessionAuthCookie
      >>= Redirection.FOUND Path.home
  
  let redirectWithReturnPath redirection =
      request (fun x ->
          let path = x.url.AbsolutePath
          Redirection.FOUND (redirection |> Path.withParam ("returnPath", path)))
  
  let returnPathOrHome = 
      request (fun x -> 
          let path = 
  