Move authentication logic in is_unauthorized resource method

Fix #155