added support for flg.on in the loader code
added protocol option and SSL hostname if using https