The ESP can be in several WiFi modes - WiFi off, Access Point mode, station mode, both Access Point and Station mode. By default its in both Access Point and Station mode. It also by default when in one of the station modes will try to reconnect to one of the access points it has previously connected to.
The while (WiFi.status() != WL_CONNECTED) line is waiting for the station to be connected to an access point. If you've not done that successfully before on that ESP i guess it will not happen hence your endless dots. Probably when the example was coded and tested it was on an ESP that had previously connected to an access point ok so it does reconnect ok and the while loop terminates.
Try just deleting the line with that while statement. Also to prevent it trying to connect to an access point you could add WiFi.mode(WIFI_AP); so that its only an access point, which looks like the point of the example.
I took off this line, accessed the http://192.168.4.1/ and I could see the "You are connected" website. Thank you very much.
Now, it's probably something inside the library but, how can I change this http://192.168.4.1/ address?
Funny thing: when I open the Serial Monitor, no information is shown (none of Serial.print are shown)..interesting....