Added auth error check to callback