listen to window message event and open window if is from app