Added SSL support (needs to be more convenient with the server certificate though)