fix crash on cancel login