Fixed logout to use index