BISERVER-9147 - IE8 - Error received after login, cannot proceed.

Small improvement to the JS code.