Refactor for authentication wsgi-apache.