switches from http to https