Use http or https depending as to whether I am on localhost