change protocol to https if necessary