While customer filling register form, he should get to know while filling email address field that he is already registerd or not?
If he already registered with existing email address,password field should be appeared and can login from there, like checkout page .
You need the following parts in order to archieve that:
- Create an AJAX controller action which accepts an email address as a POST parameter and returns
- Create a JS function (i.e. with RequireJS and jQuery) which calls the new URL and modifies the form depending on the result
- Take care of usability, i.e. have a "I forgot my password" link at the right place
- Take care of security - the new controller action should be secured so not everyone can find out if any email address is registered at the shop.
The code is too much for StackExchange, but if you should have problems with the single parts, you can post them as new questions.