added logout support