ticket:3 Added tests for middleware
ticket:3 middleware works
fixed tests
ticket:1 Cleaned up, added selenium tests
ticket:3 Finished
Merge branch 't3_middleware'