Intended for http://rosettacode.org/wiki/HTTPS/Authenticated