reworked EC login
Merge remote-tracking branch 'rel00p/newlogin'

* moved common api request parameters into the central apiRequest method
* added return to retry