fix pop-up window and anonymous login & group code for activities