implemented logout view controller logic