https support (fixes #2)