Welcome to MPGH.
I used to have this issue once or twice, I'd be on the main forums click a thread and it would log me out. But just logging back in using the top right login on the thread you want to download from usually works, and then you can download the attachment (providing it's been approved).