Or you can overwrite the localhost with 127.0.0.1 permanently by editing hosts file at %WINDIR%\System32\drivers\etc\hosts, open up with notepad (run as administrator) and add 1 line that is:
127.0.0.1 localhost
Or there might already has this line but has been commented out by #.
Simply uncomment it by removing # and save the file.
Then it should work with localhost. ??