ticket:3 fix middleware
Merge branch 't3_middleware'
ticket:5 add image field to model
ticket:5 fix uploads urls; add auth urls
ticket:5 add login/logout templates
ticket:5 add edit form template; update main tpl
ticket:5 add test cases for auth and form data