anchor.diff:              Hash = case Password of
                   <<>> -> CurrentPasswordHash;
                   _Else ->
  -                    H = couch_util:encodeBase64(crypto:sha(<<UserSalt/binary, Password/binary>>)),
  +                    H = hash_password(Password, UserSalt),
                       H
                   end,
               Hash;
  
positive.code:         couch_util:encodeBase64Url(SessionData ++ ":" ++ ?b2l(Hash)),
          [{path, "/"}, {http_only, true}]). % TODO add {secure, true} when SSL is detected
  
  % Login handler with user db
  handle_login_req(#httpd{method='POST', mochi_req=MochiReq}=Req, #db{}=Db) ->
      ReqBody = MochiReq:recv_body(),
  
negative.code:         end,
              
          UserSalt = couch_util:new_uuid(),
          PasswordHash = hash_password(Password, UserSalt),
          DocId = couch_util:new_uuid(),
          {ok, UserDoc} = user_doc(DocId, UserName, UserSalt, PasswordHash, Email, Active, Roles1),
          {ok, _Rev} = couch_db:update_doc(Db, UserDoc, []),
  