fix cancel login memory bug