SSL support and server error handling