added js handling for weblogin