Added some listeners for when the connection changes