refactored auth middleware
Merge pull request #703 from dspaeth-faber/probosal_for_auth_middelware_refactoring

Make auth middleware extendable