separated js and html file, auto refresh page working