Make it so that we use https when the session is secure and http when not