added redirect to home page logic