Why does drupal_session_start fail after a user clears cache then logs back in?
For D6, following lines will work to get the session values                                                          

require_once './includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);


If you are using D7 user Drupal's built-in ajax framework.