Repository navigation
Signing in from a page that carries a referer now returns there. The enhanced sign-in posted to customer/ajax/login, which never reports the referer, so a shopper sent to sign in on the way to checkout landed on the account dashboard instead. When the form's post URL carries a referer, the enhancer validates the fields and then submits the form natively, so loginPost applies Magento's own redirect rules, including customer/startup/redirect_dashboard and the same-origin check.