Hello Thomas and welcome to the site.
You might want to start a new thread by posting the question in the Miscellaneous section. Probably get more action there. That part that is clicking under the side cover is the starter solenoid. It appears to not be getting enough voltage to complete the circuit. As a test, make sure the bike is in neutral and jump the two heavy wires with a screwdriver. If the bike turns over check the starter relay under the fuel tank. Contacts in the relay can be corroded. I usually take the relays apart and check the points in them. Replace the relay if needed. You can match them up in most auto shops.
Also, make sure your ground from the battery to the frame is also good and tight.