Modified the reset mechanism for login