Ensure poet has access to poem. Use events for error handling.

New method 'isPoetInPoem' on PoetsRepository returns true if the poem includes the poet.

Introduce socket-events module for the socket.io joinPoem event handler. Call isPoetInPoem to verify the poet can join the room.

Add AuthenticationService verifyPoetAccess function to generate middleware that calls isPoetInPoem. Returns 403 if the poet is not in the poem. Hook this middleware up to the routes that need it. The name of the poemId parameter varies depending on the operation, so it is a parameter to the function that generates the middleware.

Integrate the verifyPoetAccess into the poem edit and line create endpoints. Anything else that requires the poet to be in the poem should use this middleware.

Standardize error handling by using process.emit instead of scattering console.error statements throughout the codebase.