def log_in(self, username, password):
        """
        Logs in to the CouchDB instance with the credentials `username` and
        `password`
        """
        self.resource.credentials = (username, password)
        return self.resource.get_json("_session")[2]