Fixing logout helper

see #159