implement switch to allow insecure ssl
fix compile issue
final tweaks to get login working and save insecure ssl state