Added logout to sidebar
Refactor