Update IndexController.php

I need this change for proper logout, for some reason sometimes $this->session->offsetGet('backend') is equal to boolean true, leave it for you to debug why.