public void actionPerformed(ActionEvent ae)
    {
      if(ae.getSource() == loginPanel.getLoginButton())
      {
        String szUsername = loginPanel.getUsernameField();
        String szPasscode = loginPanel.getPasscodeField();
        if(!(szUsername.isEmpty() || szPasscode.isEmpty()))
        {
          try
          {
            
            if(ub.authenticate(szUsername,szPasscode))
            {
              setVisible(false);
              new FileSelectorWindow();
              dispose();
            }
            else
              JOptionPane.showMessageDialog(null,"Incorrect Username or Passcode.",
                                            "Case Sensitive",
                                            JOptionPane.ERROR_MESSAGE);
          }
          catch(IOException ioe)
          {
            //JOptionPane.showMessageDialog(null,ioe.getMessage());
            JOptionPane.showMessageDialog(null,"Incorrect Username or Passcode.",
                                          "Case Sensitive",
                                          JOptionPane.ERROR_MESSAGE);
          }
        }
        else
          JOptionPane.showMessageDialog(null,"Username or Passcode fields can not be empty.");
      }
      else if (ae.getSource() == loginPanel.getRegisterButton())
      {
        setVisible(false);
        new RegisterFrame(thisFrame,ub);
      }
      else if (ae.getSource() == loginPanel.getRecoveryButton())
      {
        setVisible(false);
        new RecoverFrame(thisFrame,ub);
      }
    }