public String[] getSessionInfo() {
        String profileID = "";
        String accessToken = "";
        try {
            HttpClient hClient = new DefaultHttpClient();   
            HttpPost hPost = new HttpPost("https://authserver.mojang.com/authenticate");
            String jsonData = ""
                    + "{"
                    + "  \"agent\": {\n"
                    + "    \"name\": \"Minecraft\",\n"
                    + "    \"version\": 1\n"
                    + "  },\n"
                    + "  \"username\":\"" + mcUname + "\",\n"
                    + "  \"password\":\"" + mcPass + "\"\n"
                    + "}";
            hPost.setEntity(new StringEntity(jsonData, ContentType.create("application/json")));
            HttpResponse hResponse = hClient.execute(hPost);
            BufferedReader br = new BufferedReader(new InputStreamReader(hResponse.getEntity().getContent()));
            String line;
            while ((line = br.readLine()) != null) {       
               JSONParser mjp = new JSONParser();
               JSONObject mjo = (JSONObject)mjp.parse(line);
               Map response = (Map)mjo.get("selectedProfile");
               profileID = response.get("id").toString();
               accessToken = mjo.get("accessToken").toString();
            }
        } catch(Exception e) {
            e.printStackTrace();
        }
        
        String[] jsonResp = { accessToken, profileID };
        return jsonResp;
    }