code: def user_login(self, email=None, password=None):
          
          email = six.moves.input("Email: ") if email is None else email
          password = getpass.getpass() if password is None else password
  
          login_data = {
              "method": "user.login",
              "params": {"email": email,
                         "pass": password}
          }
          # If the user/password match, the server respond will contain a
          #  session cookie that you can use to authenticate future requests.
          r = self.session.post(
              self.base_api_urls["logic"],
              data=json.dumps(login_data),
          )
          if r.json()["result"] not in ["OK"]:
              raise AuthenticationError("Could not authenticate.\n{}"
                                        .format(r.json()))
docs: Login with email, password and get back a session cookie
  
          :type  email: str
          :param email: The email used for authentication
          :type  password: str
          :param password: The password used for authentication