Custom connect() function with authentication (still nees to have relative adresses)