Hello mister-moore,
Thank you for posting in the Apple Support Communities. We'd like to offer our support.
On your iPod touch (4th generation), try entering your Apple ID password, then the verification code immediately after. Here's an example: xxxxxxxxxx123456.
As for being unable to connect to the server, we recommend following the steps in the below support articles since they have resolved similar concerns in the past:
If you can't connect to the App Store, iTunes Store, or other Apple services
If you can't connect or sign in to iCloud
We hope this information is useful. Kind regards.