Forcing a redirect to https (javascript)