fixed some login/logout problems
fixed some login/logout problems