Fixed reconnecting bugs when providing bad login.