principal: raise 401 on authorization failure

Signed-off-by: Jan Aage Lavik <jan.age.lavik@cern.ch>