added --insecure flag to force use of non-https connection