Set the Cookie Domain to
.domain.com (the leading dot is important!), then the cookies should be available on all subdomains.
To determine if a user is logged in:
The easiest way would be to require vBulletins global.php and check if $bbuserinfo[userid] is set.
If this is not possible you can check the cookies manually:
- bbuserid is, obviously, the UserID
- bbpassword is md5(md5(md5('Plaintext-Password') . $salt) . 'LicenseNo'), where $salt is the value of column salt in table user for this UserID and LicenseNo is your vBulletin License Number.
Also note the bb is just the default cookie-prefix. If you have set this to vbcookie for example, the cookies would be vbcookieuserid and vbcookiepassword.