Logout and segment control working