Updated parsing and fixed order of strings in authenticate connection
string