Added deleted field option to authenticate function