public String logIn() throws SQLException {
        try {
            prodsQuery = dbc.connect().prepareStatement("SELECT * FROM users where username"
                    + "=? AND password=?");
            prodsQuery.setString(1, name);
            prodsQuery.setString(2, pwd);
            rs = prodsQuery.executeQuery();
            if (!rs.next()) {
                JOptionPane.showMessageDialog(null, "Wrong username or password.");
                new Login().setVisible(true);
                prodsQuery.close();
                return "Error.";
            }
        } catch (ClassNotFoundException ex) {
            Logger.getLogger(SuppliersDB.class.getName()).log(Level.SEVERE, null, ex);
        } finally {
            try {
                prodsQuery.close();
            } catch (SQLException ex) {
                Logger.getLogger(SuppliersDB.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
       
        return name;
    }