Proper PasswordInputDialog implementation