Handle secure curl url when coming from https; tweak token checking