Remove raising another error and return the correct response/redirect
This should fix the "Not allowed" error that shows up. From my understanding if the token expired, currently even though the "PermissionDenied" exception was caught, another one got thrown. Instead of throwing another error, the response/redirect should be returned.