Establishing connection with Pagoda server