Fix problem with logout. Issue #96