Modified test script
Changes to try and get it working with SSL