anchor.diff:                  ]});
           _Else ->
               % clear the session
  -            Cookie = mochiweb_cookies:cookie("AuthSession", "", [{path, "/"}, {http_only, true}]),
  +            Cookie = mochiweb_cookies:cookie("AuthSession", "", [{path, "/"}, cookie_scheme(Req)]),
               send_json(Req, 401, [Cookie], {[{error, <<"unauthorized">>},{reason, <<"Name or password is incorrect.">>}]})
       end;
   % get user info
  
positive.code:             % setup the session cookie
              Secret = ?l2b(ensure_cookie_auth_secret()),
              CurrentTime = make_cookie_time(),
              Cookie = cookie_auth_cookie(?b2l(UserName), <<Secret/binary, UserSalt/binary>>, CurrentTime),
              % TODO document the "next" feature in Futon
              {Code, Headers} = case couch_httpd:qs_value(Req, "next", nil) of
                  nil ->
  
negative.code:     end;
  % logout by deleting the session
  handle_session_req(#httpd{method='DELETE'}=Req) ->
      Cookie = mochiweb_cookies:cookie("AuthSession", "", [{path, "/"}, cookie_scheme(Req)]),
      {Code, Headers} = case couch_httpd:qs_value(Req, "next", nil) of
          nil ->
              {200, [Cookie]};
  