@Override
  public void login(String userName, String password) {
    this._username = userName;
    this._password = password;
    List<NameValuePair> urlParameters = new ArrayList<NameValuePair>();
    urlParameters.add(new BasicNameValuePair("action", "login"));
    urlParameters.add(new BasicNameValuePair("username", userName));
    urlParameters.add(new BasicNameValuePair("password", password));

    try {
      JSONObject jsonObject = fetchJson(urlParameters, _workflowExecutionUrl);
      if (!jsonObject.has("session.id")) {
        throw new RuntimeException("Login attempt failed. The session ID could not be obtained.");
      }
      this._sessionId = jsonObject.get("session.id").toString();
      logger.debug("Session ID is " + this._sessionId);
    } catch (JSONException e) {
      e.printStackTrace();
    }
  }
Authenticates Dr. Elephant in Azkaban and sets the sessionId

@param userName The username of the user
@param password The password of the user
app/com/linkedin/drelephant/clients/azkaban/AzkabanWorkflowClient.java