implemented reset password functionality