anchor.diff:  	{ok, Req, State}.
   
   websocket_handle({binary, Pdu}, Req, State) ->
  -    ?LOG_ERROR("data reivceved", {Pdu, State}),
  +    ?LOG_INFO("data reivceved", {Pdu, State}),
       supercast_server:client_msg({message, ?ENCODER:decode(Pdu)}, State),
   	{ok, Req, State};
   websocket_handle(_Data, Req, State) ->
  -    ?LOG_ERROR("Unknown handle", {_Data,Req,State}),
  +    ?LOG_INFO("Unknown handle", {_Data,Req,State}),
   	{ok, Req, State}.
   
   websocket_info({send, Ref, Pdu}, Req, #client_state{ref=Ref} = State) ->
  -    ?LOG_ERROR(" send", {Pdu, State}),
  +    ?LOG_INFO(" send", {Pdu, State}),
       {reply, {binary, Pdu}, Req, State};
   websocket_info({encode_send, Ref, Msg},
           Req, #client_state{ref=Ref} = State) ->
  -    ?LOG_ERROR("encode send", {Msg, State}),
  +    ?LOG_INFO("encode send", {Msg, State}),
       Pdu = ?ENCODER:encode(Msg),
       {reply, {binary, Pdu}, Req, State};
   websocket_info({auth_success, Ref, Name, Roles, Mods},
           Req, #client_state{ref=Ref} = State) ->
  -    ?LOG_ERROR("auth success", {Name, State}),
  +    ?LOG_INFO("auth success", {Name, State}),
       NextState = State#client_state{
           user_name = Name,
           user_roles = Roles,
  
positive.code:     erlang:send(Pid, {send, Ref, Pdu}).
  
  init({tcp, http}, _Req, _Opts) ->
      ?LOG_ERROR("init http"),
  	{upgrade, protocol, cowboy_websocket}.
  
  websocket_init(_TransportName, Req, _Opts) ->
      ?LOG_ERROR("init websocket"),
  	%erlang:start_timer(1000, self(), <<"Hello!">>),
      State = #client_state{
          pid           = self(),
          ref           = make_ref(),
  
negative.code:     {ok, Req, NextState};
  websocket_info({auth_fail, Ref, _UserName},
          Req, #client_state{ref=Ref} = State) ->
      ?LOG_INFO("Failed to register user", _UserName),
      {ok, Req, State};
  websocket_info(_Info, Req, State) ->
      ?LOG_INFO("Unknown info", {_Info,Req,State}),
  	{ok, Req, State}.
  
  websocket_terminate(_Reason, _Req, State) ->
      supercast_server:client_msg(disconnect, State),
      ?LOG_INFO("Terminated", {_Reason,_Req,State}),
  	ok.
  
  