anchor.diff:  let bindToForm form handler =
       bindReq (bindForm form) handler BAD_REQUEST
   
  +let authenticateUser (user : Db.User) =
  +    Auth.authenticated Cookie.CookieLife.Session false 
  +    >>= session (function
  +        | CartIdOnly cartId ->
  +            let ctx = Db.getContext()
  +            Db.upgradeCarts (cartId, user.UserName) ctx
  +            sessionStore (fun store -> store.set "cartid" "")
  +        | _ -> succeed)
  +    >>= sessionStore (fun store ->
  +        store.set "username" user.UserName
  +        >>= store.set "role" user.Role)
  +    >>= returnPathOrHome
  +
   let logon =
       choose [
           GET >>= (View.logon "" |> html)
  
positive.code: let register =
      choose [
          GET >>= (View.register "" |> html)
      ]
  
  let cart = 
  
negative.code:             let (Password password) = form.Password
              match Db.validateUser(form.Username, passHash password) ctx with
              | Some user ->
                  authenticateUser user
              | _ ->
                  View.logon "Username or password is invalid." |> html
          )
  