Added support for secure connection (SSL) to solve unsecure exceptions from browser when use in https sites.