Bug fix: Cookie expiration (Issue #665)