Is it possible to bypass the Varnish cache when the user is logged in? I've tried using the "CraftSessionId" cookie, but it seems that it is also set for non logged in users.
CraftSessionId is just the PHP session cookie renamed, so you'll get it on every request that requires session, regardless if they are authenticated with Craft or not.
The Craft authentication cookie is a cookie with a 32 character randomly generated name. i.e.