add special handling for localhost
v2.0.2
remove hostname validation as it's unecessarily restrictive