fixed issue 1582:Cannot login_bare in a web2py shell, thanks Alan