Better output for debugging
Added a logger to the session object
Fixed some deadlock issues

Turns out that just enough happens in the updateObject() function
to make it possible to deadlock if we mutex-guard that call. Thanks
to the botting scripts for helping catch this.