localhost and cross domain working