Fixed onion test.
Fixed segfault.
Fixed some issues.

Friends with multiple ips (on LAN) should be handled better.

Remade the function to check the crypto connection status.