Fixed modal popping up when logging out sometimes