added constants and tests for unauthorized