anchor.diff:      end.
   
   load_user_from_db(UserName) ->
  -    DbName = couch_config:get("chttpd_auth", "authentication_db"),
  -    {ok, Db} = ensure_users_db_exists(?l2b(DbName)),
  -    UserProps = case couch_db:open_doc(Db, UserName, []) of
  +    DbName = couch_config:get("chttpd_auth", "authentication_db", "users"),
  +    try fabric:open_doc(DbName, UserName, []) of
       {ok, Doc} ->
           ?LOG_INFO("cache miss on username ~s", [UserName]),
           {Props} = couch_doc:to_json_obj(Doc, []),
  
positive.code:             revs = {Pos, [Rev]},
              deleted = true
          },
          {ok, _Rev} = couch_db:update_doc(Db, UserDoc, []),
          send_response(Req)
      end.
  
  
negative.code:     _Else ->
          ?LOG_INFO("no record of user ~s", [UserName]),
          nil
      catch error:database_does_not_exist ->
          nil
      end.
  
  ensure_users_db_exists(DbName) ->
      try fabric:get_doc_count(DbName) of
      {ok, N} when is_integer(N) ->
          ok;
      {error, _} ->
          fabric:create_db(DbName, [])
      catch error:database_does_not_exist ->
          fabric:create_db(DbName, [])
      end.
  
  % internal functions
  