check if local credentials are still valid on first load
fix logout bug: don't remove credentials BEFORE sending logout request