Added initial variants of middleware and auth backend. No tests for now
improved test coverage
Merge branch 'token_generator' into auth_middleware
middleware test suite