ssl connetions work. Needs to be neatened