Changed auth decorator to use server-side exception middleware. Also
fixed handling of expired certificates in the client exception handler.