Fix the authorise problem
Merge pull request #440 from allenzhao/categoryfix

Fix the authorise problem. Closes #437.