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

Replaced elem.hasAttribute call by elem.getAttribute !=null, because the former is not defined in IE8