while I can't reproduce your problem with the passwort dialog
disappearing too fast (maybe it's website-specific? a url for
testing would be helpful), I can at least recommend to clear the
wrong passwords completely with the user names and try re-entering
them the next time you log in. In the Preferences, go to
Security>Saves Passwords… and remove the wrong ones.