Added server encryption and online mode

Adds encryption and online mode to server ! (The tests aren't written, I've never written tests of my life and have no idea how to do it... it all seems too strange.)