Fixing logout issue