Added javascript to make training phase automatically redirect to testing phase.