fixed a "login fail and go  back" bug