register popup and functionality