modifed to use WSGI middleware and module defined authentication
added missing import