Fixing function calls to add username and password.

Also fix how responses are parsed.