Added switching back to asynchronous mode when login attempt failed