$http returning NULL on first call after launch (ionic) everytime, but after subsequent http post its ok


I’ved put this question on stackoverflow with a bounty

Whenever I launch my app, and click on login on the first few tries, the login will attempt a POST http to the server. However $http always (everytime) returns NULL on first try. sometimes after several few tries still NULL if done fast. But subsequently, its all ok.

I dont get it, why is $http returning NULL initially ??

code to reproduce the problem here:

Any ideas ? Im using ionic 1.7.14 on device iOS 9.3.1