Made SSL actually work

SSL now works, although still not foolproof, more commits to come