Only add event listeners after successfull connection