Replacing current page, so the back button won't cause an infinite loop