Redirect login failure

New Member
4 0 0

I have embedded the login forms into a product page (so not customers/login but rather products/<product-name>).

When a user encounters an error when logging in on this form (for example they mistype there password, or they don't have an account) they get redirected to customers/login where the errors are displayed. 

How can I have errors show up on the products/<product-name> page where I have embedded the form?

I don't want it to redirect to the customers/login page to show the errors because it exists my custom workflow.