changed the logout to look at index