added browser page refresh handling code to redirect user to home page