made a few changes in order to have the v2 client authenticate properly when running on localhost