Move authentication logic in is_unauthorized resource method

Fix #155
Merge pull request #158 from cbmi/issue-155

Move authentication logic in is_unauthorized resource method