- Updated the code to correctly find pending batches based on who is logged in