finish reset password function