Well almost working.
It works as part of the add-to-cart process, meaning, they can click add to cart, see the login page, click through to the registration page, register & login with one form ( ;-) ) and then be redirected to the viewcart page.
However, if the user simply comes to the site and tries to sign up directly (without going through the add-to-cart function) when I remove all the redirects in the "Authenticate User" behavior dialog, then they get redirected to the "You have entered a duplicate email address" page (even though it's not a duplicate and they are, technically, both registered correctly and getting logged in correctly. It's only the redirect that's broken). I assume that is because it's simply the only other redirect in the code so it defaults to there.
Formerly in the "Authenticate User" behavior dialog, I had it set to be redirected to the customer_profile page if they just come right the the registration page and sign up. I would still like them to be sent to the customer_profile IF it's a "normal" sign-up and they are not in the middle of being redirected to the viewcart page.
Is that possible?
I tried adding the customer_profile "redirect on success" back into it, but they still get sent to the "duplicate email" page. Strange - that all worked before. Maybe the code is in the wrong order?
I'm attaching the page here.