title: What's the difference between authenticate and login?
body: <p>Documentation: <a href="https://docs.djangoproject.com/en/1.7/topics/auth/default/#django.contrib.auth.login" rel="noreferrer">https://docs.djangoproject.com/en/1.7/topics/auth/default/#django.contrib.auth.login</a></p>
  
  <blockquote>
    <p>When you’re manually logging a user in, you must call authenticate() before you call login(). authenticate() sets an attribute on the User noting which authentication backend successfully authenticated that user (see the backends documentation for details), and this information is needed later during the login process. An error will be raised if you try to login a user object retrieved from the database directly.</p>
  </blockquote>
  
  <p>So why exactly is <code>authenticate</code> and <code>login</code> 2 separate functions? From what I understand, <code>authenticate</code> just verifies the login information. <code>login</code> will take the user object and set the cookies. The only reason I can think they are separate is because maybe you can put different user objects in, say the user had 2 accounts merged. Maybe you want to verify the email address first. Is that why they are separate functions and <code>login</code> doesn't wrap <code>authenticate</code>?</p>