code: def _authenticate(self):
          
          # to obtain csrftoken, remove Referer from headers
          headers = HEADERS.copy()
          headers.pop('Referer')
  
          # initial GET request
          self.client = requests.Session()
          self.client.proxies = self._proxies
          self.client.verify = self._ssl_verify
          self.client.stream = True
          self.client.get(LOGIN_ENDPOINT, headers=headers)
  
          # set headers to submit POST request
          token = INITIAL_DATA.copy()
          token['csrfmiddlewaretoken'] = self.csrftoken
          token['email'] = self._username
          token['password'] = self._password
  
          req = self.client.post(LOGIN_ENDPOINT, data=token, headers=HEADERS)
  
          if req.status_code != 302:
              req.raise_for_status()
  
          setup = self.client.get(SETUP_ENDPOINT, headers=HEADERS)
          # populate device list
          self.html['setup'] = generate_soup_html(setup.text)
  
          # currently only one faucet is supported on the code
          # we have future plans to support it
          parsed_controller = serial_finder(self.html['setup'])
          self.controllers.append(
              RainCloudyController(
                  self,
                  parsed_controller['controller_serial'],
                  parsed_controller['faucet_serial']
              )
          )
          self.is_connected = True
          return True
docs: Authenticate.