how about use the interface of media manager?
the url should be: http://your.wiki/?image=wiki:logo.png&do=media
you need to change the parameter image to the id of the image.
there will be a simple message warn user that they are not allowed to read file,
but there is still no login interface.
i usually create a page contain the image when i upload image,
which contain the basic information about the image.
for your case, guest could see the login interface at the page contain image.