JSON friendly logout