Created timeout functions to automatically refresh page periodically.