@SuppressWarnings("unchecked")
    public String loadUsers() {
        PreparedStatement st = null;
        PreparedStatement ust = null;
        ResultSet rs = null;
        ResultSet urs = null;
        JSONArray json = new JSONArray();
        try {
            conn = dbconn.getConnection();
            st = conn.prepareStatement("SELECT * FROM users WHERE active = 1");
            rs = st.executeQuery();
            while (rs.next()) {
                JSONObject o = new JSONObject();
                o.put("id", rs.getInt("id"));
                o.put("email", rs.getString("email"));
                o.put("first_name", rs.getString("first_name"));
                o.put("last_name", rs.getString("last_name"));
                ust = conn.prepareStatement("SELECT * FROM user_roles WHERE email = '" + rs.getString("email") + "'");
                urs = ust.executeQuery();
                if (urs.next()) {
                    urs.last();
                    Role s = intToRole(urs.getRow());
                    o.put("role", s.toString());
                }
                json.add(o);
            }
            urs.close();
            ust.close();
        } catch (SQLException e) {
            e.printStackTrace();
        } finally {
            try{
                conn.close();
                st.close();
                rs.close();
            }catch (SQLException e) {
                System.out.println("Error closing query");
            }
        }
       return json.toString();
    }