big commit: web.py support, logins and sessions, template, and other functions