Redirects to index page on refresh