Allow HTTPS Conenction

Detect wheterh we are using HTTP or HTTPS connection and store the
value as 0 for HTTP and 1 for HTTPS in a variable for  use throughout
the system