Added support for two-step authentication. The login function will
now email a 6-digit code to users if the user is part of a group
with role 'web2py TWo-Step Authentication'.
Modified email subject to generic message.
Look in auth_group table for group role name, and use Rows correctly.
Update tools.py

Forgot to import 'random' module.
Merge pull request #431 from ortgit/enhancement/two_step_authentication

Added support for two-step authentication.