Red loctite, can i find that at like home depot?
Probably, this is what you're looking for.
http://www.loctiteproducts.com/p/t_lkr_red/overview/Loctite-Threadlocker-Red-271.htmBlue loctite will also work but won't hold as well as red, purple is a no go.
Here's a poorly drawn pic of the bottom of the 510 and its pieces.
So the bottom of the 510 is made of 3 threaded inserts, negative, insulator, and positive. The negative is the largest diameter outside piece and you won't need to mess with it. The blue insulator is threaded on the outside and inside and you also won't need to mess with it. Finally the positive insert is threaded on the outside and the end of it is smooth, if you unscrew it a bit you'll see what I mean.
Steps to repair the issue:
Take the press fit nut off (using a pair of pliers this should be easy if it's loose, just don't break off the positive (red wire) when you do it)
Unscrew the positive section a bit so the spring inside doesn't apply any pressure after you snap the hex nut back on
Put a TINY (like half a grain of dry rice tiny, you don't need much) dab of red loctite near the end of the positive insert on the smooth part and don't get any on the threads
If you get any on the threads clean it off with alcohol or else you'll never be able to undo the positive insert again without a ton of work, same goes for after you snap the nut back on
After you have a bit of loctite on the positive insert snap the hex nut back on and leave the insert unscrewed for a bit so it can dry/ cure or whatever
After maybe 15-30 min thread the insert back in fully and you should be good to go
If you have any specific questions feel free to PM me, I messed with the 510 for a while before finally fixing it.