Enforced HTTPS on Homepage using Javascript