private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        //no uname
        if (uNameField.getText().equals("")) {
            JOptionPane.showMessageDialog(this,
                    "Please enter a username.",
                    "No Username",
                    JOptionPane.ERROR_MESSAGE);
        }
        //no password
        else if (jPasswordField1.getPassword().length == 0) {
            JOptionPane.showMessageDialog(this,
                    "Please enter a password.",
                    "No password",
                    JOptionPane.ERROR_MESSAGE);
        } 
        //passwords match
        else if (Arrays.equals(jPasswordField1.getPassword(),
                jPasswordField2.getPassword())) {

            User temp = (User) MongoHelper.fetch(new User(uNameField.getText()),
                    MongoHelper.USER_COLLECTION);
            //nobody took your spot
            if (temp == null) {
                //hashish
                String password = new String(jPasswordField1.getPassword());
                String pw_hash = BCrypt.hashpw(password, BCrypt.gensalt());
                //new user
                User u = new User(uNameField.getText(),
                        pw_hash);
                MongoHelper.save(u, MongoHelper.USER_COLLECTION);
                //custom title, no icon
                JOptionPane.showMessageDialog(this,
                        "Account creation successful! \n"
                        + "You will now be logged in.",
                        "Acount creation success",
                        JOptionPane.PLAIN_MESSAGE);

                //go ahead and log them in
                DataManager manager = new DataManager(u.getId());
                MainInterface m = new MainInterface(manager);
                m.setVisible(true);
                //LoginBox l = new LoginBox();
                //l.setVisible(true);
                //System.out.println("New User");
                this.dispose();
            }
            //lol no name for you
            else {
                //infoLabel.setText("Username already taken");
                //System.out.println("Pre-existing user");
                //custom title, error icon
                JOptionPane.showMessageDialog(this,
                        "Username already taken.",
                        "Username conflict",
                        JOptionPane.WARNING_MESSAGE);
            }
        }
        //learn to type
        else {
            //infoLabel.setText("Password mismatch");
            //System.out.println("Password Mismatch");
            JOptionPane.showMessageDialog(this,
                    "The passwords you entered don't match. \n"
                    + "Please try again.",
                    "Password mismatch",
                    JOptionPane.WARNING_MESSAGE);
        }
    }//GEN-LAST:event_jButton1ActionPerformed