Basic connection with server and registration