Added resetPassword function