Session cookie logic for drupal.

There must be a logic for Drupal somewhere that stops caching when the user is authenticated or a session cookie has been generated for some reason.