Update restapi.js

* For Android, objects need to be stringified before logging
* Some `;` and `==` and global fixes found via JSLint
* Debug actual server response instead of parsed JSON
Merge pull request #17 from FokkeZB/patch-2

Update restapi.js