wrap undo/migrate in an authenticate call and log error