adding window controller to catch logout + refactor switch case in managers