code: def login(self, username, password):
          
          url = get_url("/login.action", scheme="https")
          params = {
              'username': username,
              'password': password,
              'submit-login': '',
          }
          with contextlib.closing(self.opener.open(url, urllib.parse.urlencode(params))) as response:
              if not "loginAction.jsp" in response.url:
                  raise AuthenticationError("Login failed. Unexpected redirection: %s" % response.url)
              if not "resultMessage=success" in response.url:
                  raise AuthenticationError("Login failed.")
  
          self.authenticated = True
docs: Log in.
  
          AuthenticationFailedException exception is raised if authentication fails.