Connecting to the endpoint, adding the typeahead functionality