Simplify check email code for resetting password