fixes session cookie never empty. Fixes #2107