Fix refreshing issue on register page.