fixed a bug that the cancel of authentication doesn't work.