Added Functionality to redirect to main page