Fix for logout issue #4