anchor.diff:      list_to_integer(Value);
   to_int(Value) when is_integer(Value) ->
       Value.
  +
  +make_cookie_time() ->
  +    {NowMS, NowS, _} = erlang:now(),
  +    NowMS * 1000000 + NowS.
  
positive.code:         true ->
              % setup the session cookie
              Secret = ?l2b(ensure_cookie_auth_secret()),
              {NowMS, NowS, _} = erlang:now(),
              CurrentTime = NowMS * 1000000 + NowS,
              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
  
negative.code:     Cookies = mochiweb_cookies:parse_cookie(CookieHeader),
      AuthSession = proplists:get_value("AuthSession", Cookies),
      if AuthSession == undefined ->
          TimeStamp = make_cookie_time(),
          [cookie_auth_cookie(?b2l(User), Secret, TimeStamp)];
      true ->
          []
  