return unwrapBKey after signIn with keys flag; also fix tests