Added SSL support and set timeout values.