store userid in cookie