how to add security to pop window