Login to Mikrotik hotspot with batch file and curl !

Hi, i’m looking for a batch file to login mikrotik hotspot.
before this i could find and tried this code: https://github.com/montaro/mikrotik-autologin/blob/master/mtlogin.py
but not work for me !!!

file: "/login.html" truncated
salted password: ~12345`▲aKµ┼¬╨↔&Ü≈╫╞≡≡
hashed password: ead22b4c36cab0951dafdfdd8c628849
Traceback (most recent call last):
  File "mtlogin.py", line 80, in <module>
    main()
  File "mtlogin.py", line 76, in main
    login(username, hex_hash_password)
  File "mtlogin.py", line 53, in login
    raise Exception('Login Failed')
Exception: Login Failed

so i prefer using curl !
how i can use curl in a batch file in order to : login - logout - change account
hotspot ip: 192.168.1.1
hotspot URL: test.com
usename = test & password =12345
thanks.