Some additions to logout process;