private void btnIniciarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnIniciarActionPerformed
        String usuario = txtUsuario.getText();
        char[] pass = txtPassword.getPassword();
        String password = password(pass);
        try {
            /*
            -1: No esta registrado
            0: Registrado, login y password no coinciden
            1: Usuario regular
            2: Admin
            */
            int login = cliente.loginUsuario(usuario, password);
            switch (login){
                case 2:
                    JOptionPane.showMessageDialog(null, "Click en OK para Continuar", "Login Exitoso", JOptionPane.INFORMATION_MESSAGE);
                    GUI_GestorInfoAdmin Admin = new GUI_GestorInfoAdmin(cliente);
                    Admin.setVisible(true);
                    this.setVisible(false);
                    break;
                case 1:
                    String catcha = cliente.compCatcha();
                    String catchaV = JOptionPane.showInputDialog(null, "Ingrese: " + catcha);
                    if(catchaV.compareTo(catcha)==0){
                        JOptionPane.showMessageDialog(null, "Click en OK para Continuar", "Login Exitoso", JOptionPane.INFORMATION_MESSAGE);
                        GUI_GestorInfo User = new GUI_GestorInfo(cliente);
                        User.setVisible(true);
                        this.setVisible(false);
                        break;
                    }else{
                        JOptionPane.showMessageDialog(null, "Catcha Incorrecta", "ERROR", JOptionPane.ERROR_MESSAGE);
                    }
                    
                case 0:
                    JOptionPane.showMessageDialog(null, "Usuario o Contraseña Incorrecta", "ERROR", JOptionPane.ERROR_MESSAGE);
                    break;
                case -1:
                    JOptionPane.showMessageDialog(null, "El Usuario no esta registrado", "ERROR", JOptionPane.ERROR_MESSAGE);
                    break;
            }
        } catch (RemoteException ex) {
            Logger.getLogger(GUI_Login.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_btnIniciarActionPerformed