#307 & #623: Using https by default and validating certificate