Added option to use https