Fixes to better deal with "null" (as a string) values for some cookie values during SSO authentication and align tests with new code