If you are hearing a clicking, that says relay. If it clicks every time you connect the battery that makes me think it is powering up, the question then becomes how. My first guess is the ignition switch. You could remove the power coming from the switch, see if clicking is still present. That wire is on the Ig terminal of the regulator

regulator wire id
Ig - Ignition
N - Neutral/stator
F - Field
E - Earth
L - Charge light
B - Battery