MINOR: Fix authentication check and do some small refactoring in ClusterLinkConnectionChecker (#7161)