What you want to do is write a PHP script that serves up the files. Let's say the script is called get_file.php. So the link to picture1.jpg looks like this:
http://www.mypage.com/get_file.php?file=12
Then the logic of get_file.php looks like this:
1. Check cookie to see if user is logged in.
2. If no, send them to the login page.
3. If yes, then figure out which file they are trying to see.
4. From the URL, $file = 12 so look that up in an array or a database.
5. you determine that file #12 is picture1.jpg.
6. Print out content headers for JPG.
7. Read and output the contents of picture1.jpg
This way, there is no .htaccess pop up. And you have 100% control over their ability to retrieve the file. (Of course, they could still save, copy, and republish the file so it's not perfect protection, but it does prevent them from loading the file from your site unless they are logged in).