added SSL Handling