anchor.diff:              Res = {struct, [{state, "error"}, {reason, "unknown user"}]},
               NewS = S
       end,
  -    {Res, NewS};
  +    {{Res,[]}, NewS};
   %% http://idrott/idrott/reset_password?rpid=1234567890&password=test
  -do_cmd("reset_password", L, _Json, S) ->
  +do_cmd("reset_password", L, _Json, _A, S) ->
       Rpid = get_val("rpid", L, ""),
       Password = get_val("password", L, ""),
       case get_user_by_rpid(Rpid, S) of
  
positive.code:                     NewU = OU#user{password=Md5NewPass},
                      Res = {struct, [{status, "ok"}]},
                      NewS = S#state{users=update_user(NewU, S#state.users)},
                      {Res, NewS};
                  false ->
                      Res = {struct, [{status, "error"},
                                      {reason, "unknown user"}]},
                      {Res, S}
              end;
          #user{} ->
              Res = {struct, [{status, "error"},
                              {reason, "only allowed for admin user"}]},
              {Res, S};
          _ ->
              Res = {struct, [{status, "error"},
                              {reason, "unknown sid"}]},
              {Res, S}
      end;
  %% http://idrott/idrott/get_all_users?sid=1234567890
  do_cmd("get_all_users", L, _Json, S) ->
      Sid = get_val("sid", L, ""),
      case get_user_by_id(Sid, S) of
          #user{} ->
              %% login successful
  
negative.code:     end.
  
  read_data() ->
      case file:read_file(?DATAFILE) of
          {ok, Bin} ->
              binary_to_term(Bin);
          _ ->
  