Fix login & cross browser issue