Added HTTPS support