Issue 8757 by sgl: Handle empty sessionsid as in drupal 7