anchor.diff:  
   
   get_json(Req, #state{version=Version, type=Type, id=Id, method=get,
  -                     session_pid=Session } = State) ->
  +                     session_pid=Session} = State) ->
       Result = perform_get(Type, Id, Session, Version),
       ok = end_session_if_rest(State),
  -    {Result, Req, State#state{session_pid=undefined}}.
  +    {ok, Req2} = update_cookie_if_used(Req, State),
  +    {Result, Req2, State#state{session_pid=undefined}}.
   
   
   post_json(Req, #state{version=Version, type=Type, id=Id, method=post,
  
positive.code: end_session_if_rest(_) ->
      ok.
  
  
  
  perform_logout(Session) ->
  
negative.code:                       cookie_based=CookieBased} = State) ->
      Result = perform_post(Type, Id, Json, Session, CookieBased, Version),
      ok = end_session_if_rest(State),
      {ok, Req2} = update_cookie_if_used(Req, State),
      {Result, Req2, State#state{session_pid=undefined}}.
  
  perform_get(service, undefined, Session, 1) ->
      {ok, ServiceList} = tts:get_service_list_for(Session),
  