Support for TLS

This patch introduces TLS support for the driver, so that the communication between the app and the server are encrypted.