Added connect button functionality client side