refactor change password and some forgot password functionality