Feature/add ssl support

This PR adds support for SSL.