logic for onboarding new user and cookies