ecmascript: Remove debug from getAuthCredentials

Fixes #2307
ecmascript: Add message popup

Fixes #2306
ecmascript/http.js: Make sure toString() always makes a string

Fixes #2305
ecmascript/http: Add missing support for HTTP headers

Fixes #2303