This is nothing to do with cookies or being logged in. I can right click, save as... and it will say "attachment.php" in the filename. If I go get a coffee and come back 10 minutes later and do the exact same thing on the same file it will fill in the save as file name correctly.