Fixing issue with logout