title: Why am I getting "Web Login Required" message while connecting to Gmail via IMAP?
body: <p>I'm trying to connect and retrieve a list of message headers from Gmail via IMAP.</p>
  
  <p>I'm getting a response from Google with "Web Login Required" and then a URL to continue the sign-in via the web interface. Log: <a href="http://hastebin.com/odufaducew.vhdl" rel="noreferrer">http://hastebin.com/odufaducew.vhdl</a></p>
  
  <p>Why does this happen? How to handle this case? I'm using the MailCore2 lib for iOS if that helps at all.</p>