anchor.diff:                      {name, UserName},
                       {roles, couch_util:get_value(<<"roles">>, UserProps2, [])}
                   ]});
  -        _Else ->
  +        false ->
  +            authentication_warning(Req, UserName),
               % clear the session
               Cookie = mochiweb_cookies:cookie("AuthSession", "", [{path, "/"}] ++ cookie_scheme(Req)),
               {Code, Headers} = case couch_httpd:qs_value(Req, "fail", nil) of
  
positive.code:                             name=UserName,
                              roles=couch_util:get_value(<<"roles">>, UserProps2, [])
                          }};
                      _Else ->
                          throw({unauthorized, <<"Name or password is incorrect.">>})
                  end
          end;
  
negative.code:     Padding = binary:copy(<<"0">>, Len),
      Padded = <<Padding/binary, Unpadded/binary>>,
      binary:part(Padded, byte_size(Padded), -Len).
  
  authentication_warning(#httpd{mochi_req = Req}, User) ->
      Peer = Req:get(peer),
      couch_log:warning("~p: Authentication failed for user ~s from ~s",
          [?MODULE, User, Peer]).
  