Changed password reset logic