Format authentication response properly