Fix debug logging.
Added automated ping/pongs for activity timeouts.