title: Using Scrapy with authenticated (logged in) user session
body: <p>In the <a href="https://doc.scrapy.org/en/latest/topics/request-response.html#using-formrequest-from-response-to-simulate-a-user-login" rel="noreferrer">Scrapy docs</a>, there is the following example to illustrate how to use an authenticated session in Scrapy:</p>
  
  <pre><code>class LoginSpider(BaseSpider):
      name = 'example.com'
      start_urls = ['http://www.example.com/users/login.php']
  
      def parse(self, response):
          return [FormRequest.from_response(response,
                      formdata={'username': 'john', 'password': 'secret'},
                      callback=self.after_login)]
  
      def after_login(self, response):
          # check login succeed before going on
          if "authentication failed" in response.body:
              self.log("Login failed", level=log.ERROR)
              return
  
          # continue scraping with authenticated session...
  </code></pre>
  
  <p>I've got that working, and it's fine. But <strong>my question is</strong>: What do you have to do to <code>continue scraping with authenticated session</code>, as they say in the last line's comment?</p>