Update to handle SSL