Add auto refresh functionality