code: public static String authenticateAndGetSessionId(String username, String password, String azkabanServerUrl)
        throws IOException, EncoderException {
      // Create post request
      Map<String, String> params = Maps.newHashMap();
      params.put("action", "login");
      params.put("username", username);
      params.put("password", codec.encode(password));
  
      return executePostRequest(preparePostRequest(azkabanServerUrl, null, params)).get("session.id");
    }
docs: *
  Authenticate a user and obtain a session.id from response. Once a session.id has been obtained,
  until the session expires, this id can be used to do any API requests with a proper permission granted.
  A session expires if user log's out, changes machine, browser or location, if Azkaban is restarted,
  or if the session expires. The default session timeout is 24 hours (one day). User can re-login irrespective
  of wheter the session has expired or not. For the same user, a new session will always override the old one.
  @param username Username.
  @param password Password.
  @param azkabanServerUrl Azkaban Server Url.
  @return Session Id.
  @throws IOException
  @throws EncoderException