In the file gluon/tools.py line 808 in trunk the Auth class __init__ method you will find these lines
if auth and auth.last_visit and auth.last_visit\
+ datetime.timedelta(days=0, seconds=auth.expiration)\
> request.now:
self.user = auth.user
self.user_id = self.user.id
auth.last_visit = request.now
I am guessing this branch does not run when used in a standalone environment
and the else branch not shown above runs instead which sets the 3 values to
None.

