Fix Search Tests and proper cookie cleanup