reset generates logout only if logged on

#168 fix applied to 1.4 branch