Add authentication related error handling.