Hostname authentication requires a couple of prerequisites to work correctly. If these are not in place, you may see the Captive Portal or your captures may show the IP address as the username upon a hostname authentication failure.
For hostname authentication to work correctly, the following needs to be in place.