add https/secure support