Cookie handling for auth in client