public boolean Loging(String nick, String pass) { //ok

        //verificar logueo 
        boolean flag = false;

        try {
            String queryString = "Select password from Usuarios where nick = ?;";
            connection = getConnection();
            ptmt = connection.prepareStatement(queryString);
            ptmt.setString(1, nick);
            resultSet = ptmt.executeQuery();
            if (resultSet.next()) {
                if (resultSet.getString("password").equals(pass)) {
                    flag = true;
                     System.out.println("usuario correcto");
                }

            }
           
        } catch (SQLException e) {
            e.printStackTrace();
        } finally {
            try {
                if (ptmt != null) {
                    ptmt.close();
                }
                if (connection != null) {
                    connection.close();
                }
            } catch (SQLException e) {
                e.printStackTrace();
            } catch (Exception e) {
                e.printStackTrace();
            }

        }

        return flag;


    }