Is this the password reset functionality that you are trying to implement?