final tweaks to get login working and save insecure ssl state