Fix for logout feature