login method
Authenticate current session
Implementation
Future<CtrlMessage> login(
String scheme, String secret, Map<String, dynamic>? cred) async {
var packet = _packetGenerator.generate(packet_types.Login, null);
var data = packet.data as LoginPacketData;
data.scheme = scheme;
data.secret = secret;
data.cred = [if (cred != null) cred];
packet.data = data;
CtrlMessage ctrl = await _send(packet);
_authService.onLoginSuccessful(ctrl);
return ctrl;
}