Fix auth middleware bug
Merge pull request #119 from alsotang/fix-auth-bug

Fix auth middleware bug