Fix for logout