Hmm i'm trying to get it working with headers but it doens't seem to be working.
I create a header in code named "Username" with the value of the current username or "anonymous" if none is specified. I used the developer toolbar to view the pages headers to verify that the custom header is being set, it is.
Pages are being cached, but it doens't seem to cache seperate versions based on the "username" header. If I view a page as a guest, then view the same page in a different browser as a user, the page displayed is the guest cached apge, because it shows the login form.
Here is the Output caching settings I have currently

here are one of my pages headers viewed as a guest
Content-Type: text/html
Content-Encoding: gzip
Vary: Accept-Encoding
Server: Microsoft-IIS/7.0
X-Powered-By: PHP/5.2.6
Username: anonymous
Date: Wed, 23 Jul 2008 07:45:08 GMT
Content-Length: 7905
200 OK