connection.py: cleanup and fix json
connection.py: disable logging for now