<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>GMail Login Example</title>
</head>
<body>

  {% if handler.current_user %}
    <h1>You are logged in</h1>
    {% import json %}
    <pre>handler.current_user = {{ json.dumps(handler.current_user, indent=4) }}</pre>
    <p><a href="logout?next=.">Click here to log out</a></p>
  {% else %}
    <h1>You are not logged in</h1>
    <p><a href="google?next=.">Click here to log in with your Google Account</a>.</p>
  {% end %}

  <p>See the <a href="http://code.gramener.com/cto/gramex/tree/dev/gramex/apps/guide/auth/gmail/">source code</a>.</p>

</body>
</html>
