Tweak IP address checks

- Allow logging of loopback IPs
- Fix check for private network IPs
- Make sure we never log private network IPs