DrupalGap response is HTML instead of JSON
We found the solution for our problem.
Under admin -> settings -> commons uncheck the box "Force users to login".
Now it is possible to get json responses from connect and login actions.