Added host and authentication parameters. Fixes #1 and fixes #2.