Future<bool> isAuthenticated() async { return getIdentity() != null && !getIdentity()!.getPrincipal().isAnonymous() && chain != null; }