Added TLS encryption.
Merge pull request #1 from Mardok/master

Added support for TLS encryption