Jes2850 fix cookie bug
needed to be checking for undefined instead of just null when trying to load the preferred api endpoint from cookies
needed to be checking for undefined instead of just null when trying to load the preferred api endpoint from cookies