Looks like the server is refusing to authenticate for some reason. I added some more header fields to make the http request look more like it is coming from a browser, which caused login to succeed once but then it went back to failing, some kind of bot protection I'd guess. I'm afraid I dont have the time/interest to figure out all the changes needed to convince the server to accept the request reliably. Here is my attempt:
https://github.com/kovidgoyal/calibr...7c5237acd9efda
Feel free to play with it some more.