Fix issue that caused problems on https
laid the stones for a full HTTPS fix.