Adding optional SSL support