Fixed a bug where the UnauthorisedException was being caught when it shouldn't have been.