fixed logging out bug