Throw exception when unauthorized.