Hey there Alex0945,
Welcome to the Chromecast Community Forum! Google made a change a couple of months ago with the YouTube app, and you're no longer able to log in to the YouTube app on older, pre-Chromecast with Google TV, Chromecast devices. You are still able to cast YouTube to these devices, just no longer sign in.
Let me know if you have any other questions, I'd be happy to help.