fixed reset_login_attempts

and included it in the login process to reset login attempts after an successful login