Worked on register code.
It should check if the email is already in use using ajax