Premature logout fixed.

Addresses https://github.com/hxl-team/HXLator/issues/97