everything works , but I don't know what to enter in the Data.Add('mode=login');
Depends on the specific site. You need to examine your queries to see what, if and when passed.
What a sniffer must be used when writing such programs?
For HTTP use HTTPAnalyer'ohms.
For HTTPS use Fidller'ohms.
In difficult cases, the use of Wireshark.
In very difficult cases probressive sniffer packets from the router back to the computer,
directly in Wireshark.