I did something similar based on your script:
var counter = 0;
gwd.auto_before_end = function(event) {
if (counter < 2) {
counter++;
} else {
gwd.actions.timeline.pause('page1');
}
};
gwd.end = function(event) {
gwd.actions.timeline.gotoAndPlay('page1', 'start');
};
The first event is at the end of the animation, but few frames before the text fades out.
The Second event is at the final frame,
I guess you can see what I did there :)