Move setting of cookies to ShardBoxSession.