handle "Not authorized" error a little bit more flexibly