implemented cookies to save trainerID between pages