fixed flake8 issues and added http auth decorator