Authentication for esdebug. Also share common code.