Fix login error when cancelled