added synchronized logout support