State handling fixes

Fixed infinite load loop on server-side logout.