Fixed logout in json api.