Added exception type check to RedirectHandler to fix tests (which were breaking because it was also trying to catch AccessDeniedExceptions) #2