fixed some pwd reuse detection errors. Adding new logic for login detection using cookies. Fixed an error where clear_pending_warnings might possibly update a wrong password value for a domain