Fixed logout with unapplied changes