anchor.diff:  handle_cast({die, _}, S) ->
       {stop, normal, S};
   
  -handle_cast({{get, Attrib, _Token}, ReplyTo}, #state{data = #tagcontent{} = D} = S) ->
  -    R = case Attrib of
  -            all ->
  -                make_tagdata(S#state.data);
  -            urls ->
  -                list_to_binary(mochijson2:encode(D#tagcontent.urls));
  -            read_token ->
  -                token_encode(D#tagcontent.read_token);
  -            write_token ->
  -                token_encode(D#tagcontent.write_token);
  -            {user, A} ->
  -                case proplists:lookup(A, D#tagcontent.user) of
  -                    {_, V} -> list_to_binary(mochijson2:encode(V));
  -                    _ -> unknown_attribute
  +handle_cast({{get, Attrib, Token}, ReplyTo}, #state{data = #tagcontent{} = D} = S) ->
  +    R = case check_read_token(Token, S) of
  +            false ->
  +                {error, unauthorized};
  +            true ->
  +                case Attrib of
  +                    all ->
  +                        make_tagdata(S#state.data);
  +                    urls ->
  +                        list_to_binary(mochijson2:encode(D#tagcontent.urls));
  +                    read_token ->
  +                        token_encode(D#tagcontent.read_token);
  +                    write_token ->
  +                        token_encode(D#tagcontent.write_token);
  +                    {user, A} ->
  +                        case proplists:lookup(A, D#tagcontent.user) of
  +                            {_, V} -> list_to_binary(mochijson2:encode(V));
  +                            _ -> {error, unknown_attribute}
  +                        end
                   end
           end,
       gen_server:reply(ReplyTo, R),
  
positive.code:             {ok, {ReadToken, WriteToken, Urls,
                    [{K, Value} | proplists:delete(K, User)]}}
      end.
  
  % THOUGHT: Eventually we want to partition tag keyspace instead
  % of using a single global keyspace. This can be done relatively 
  
negative.code: 
  % Normal delayed update: Append urls to the buffer and exit.
  % The requester will get a reply later.
  handle_cast({{delayed_update, Urls, Token}, ReplyTo},
              #state{delayed = {Waiters, OldUrls}, tag = Tag} = S) ->
      case check_write_token(Token, S) of
          false ->
              gen_server:reply(ReplyTo, {error, unauthorized});
          true ->
              if OldUrls =:= [] ->
                      spawn(fun() ->
                                timer:sleep(?DELAYED_FLUSH_INTERVAL),
                                ddfs:get_tag(ddfs_master, binary_to_list(Tag),
                                             all, internal)
                            end);
                 true ->
                      ok
              end,
              case validate_urls(Urls) of
                  true ->
                      {noreply, S#state{delayed = {[ReplyTo|Waiters],
                                                   Urls ++ OldUrls}},
                       S#state.timeout};
                  false ->
                      gen_server:reply(ReplyTo, {error, invalid_url_object}),
                      {noreply, S, S#state.timeout}
              end
      end;
  
  % Before handling any other requests, flush pending delayed updates
  