title: AttributeError when using DAL and Auth in standalone application
body: <p>I'm attempting to create a script which will utilize the web2py DAL to access a remote database. I'd like the app to have access to another web2py application's auth table. The script is as follows:</p>
  
  <pre><code>if MODE == 'server':
      DIR_GLUON = '...'
  else:
      DIR_GLUON = '...'
  
  sys_path.insert(0, DIR_GLUON)
  
  from gluon import DAL, Field, current
  from gluon.tools import Auth
  from gluon.storage import Storage
  import gluon.contrib.plural_rules as plural_rules
  
  # establish DB connection    
  db = DAL(..., pool_size = 1, check_reserved=['all'], lazy_tables = True, fake_migrate_all = True)
  
  auth = Auth(db)
  </code></pre>
  
  <p>The last line produces the following error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "standalone_script.py", line 39, in &lt;module&gt;
      auth = Auth(db)
    File "C:\...\web2py\gluon\tools.py", line 1754, in __init__
      request = current.request
  AttributeError: 'thread._local' object has no attribute 'request'
  </code></pre>
  
  <p>Is there a reasonable way to resolve the above error in a standalone environment? Thank you.</p>