anchor.diff:  
   -include("erlchat.hrl").
   
  +-define(session_id_param, session_id).
  +
   -define(input_not_json, <<"Input wasn't in a valid application/json format.">>).
   -define(input_not_session, <<"Input wasn't a valid session object.">>).
   -define(session_id_required, <<"Session id required to fullfill the request.">>).
   
   %% rest handler callbacks
  --export([init/3, allowed_methods/2, content_types_accepted/2, content_types_provided/2]).
  +-export([init/3, allowed_methods/2, content_types_accepted/2, content_types_provided/2, delete_resource/2]).
   
   %% custom callbacks
   -export([init_session/2, get_session/2]).
  
positive.code: parse_session(_, Req, State) ->
                  {error, error_response(bad_request, ?input_not_json, Req, State)}.
  
  session_to_json(#erlchat_session { id = SessionId, user_id = UserId }) ->
                  jsx:encode([{status, ok}, {user_id, UserId}, {session_id, SessionId}]).
  
  
negative.code:                 {upgrade, protocol, cowboy_rest}.
  
  allowed_methods(Req, State) ->
                  {[<<"GET">>, <<"POST">>, <<"DELETE">>], Req, State}.
  
  content_types_accepted(Req, State) ->
                  {[{<<"application/json">>, init_session}], Req, State}.
  
  content_types_provided(Req, State) ->
                  {[{<<"application/json">>, get_session}], Req, State}.
  
  delete_resource(Req, State) ->
                  exec_against_session(Req, State, fun delete_session/3).
  
  init_session(Req, State) ->
                  {ok, Body, Req1} = cowboy_req:body_qs(Req),
  