Implemented optional usage of HTTPS