creating separate response handlers for token generate and token confirm.