added id check in auth