rework a bunch of login stuffs for multi site logins