Give up if the first attempt fails

Also, display a "Connected!" modal if connection succeeded.