Logout button  will redirect to home page if clicked on a non-home page