popup page showing loading before the contents are loaded