This was a bug in 2.5.1.1 and has been fixed since Mendix version 2.5.2.
Also see the following question:
To prevent this, I always make sure to include .gz versions of my index.html and login.html files in every theme. I use 7-Zip to create these. As long as the index / login files are the same both in and outside of the .gz archive, there shouldn't be a problem