fixed login failed message on connect.js on chrome
should not trust javascript location.origin