Added logout to main view