fixed middleware to enforce authentication
added gitignore file
added *.pyc to gitignore