HTTPS restoration

-Restores the https handling function that was left out after the code reorganization. 
-Changes authentication method in order to use the mongo connect and query functions from the respectful package.