I noticed a weird issue when hosting multiple Drupal installations on the same domain, like a software company hosting all client demos on a single domain.
The scenario is: you will get kicked out from any installation as soon as you login to another.
I totally understand it's not a very common situation since the common is hosting all your sites from one code with multiple databases but I have mentioned the case this patch is targeting.

To cut it short, I managed to write these few lines that allow multiple logins to multiple Drupal installations on a single domain:
Simply add these lines near the end of your settings.php

if (isset($base_url)) {
  $clean_base_url = str_replace('http://', '', $base_url);
  $base_array = explode('/', $clean_base_url);
  $cookie_domain = array_shift($base_array);
  $cookie_path = implode('/', $base_array);
  ini_set('session.cookie_domain', $cookie_domain);
  ini_set('session.cookie_path', '/'.$cookie_path);

Note: Needless to say that you *should* have set $base_url above this block of code.
Hope This Helps.