Implemented connection authentication.