Hi boiwithconusion,
Thanks for coming to Apple Support Communities for help today with signing into iTunes and the app being permanently open.
Have you tried force quitting iTunes: How to force an app to quit on your Mac.
If sign in still doesn't work, have you verified elsewhere the Apple ID and password are correct? You can do this at appleid.apple.com.
Try signing in while in safe mode: Use safe mode to isolate issues with your Mac. This can let you know if there is a third party program that interferes with sign in.
You can also try signing into iTunes and the App Store inside a new test user account: How to test an issue in another user account on your Mac. This will let you know if the issue is isolated to your user or system-wide. You can even update macOS from inside this other user account with your Apple ID if you are able to sign in. Please have a backup if you proceed: Back up your Mac with Time Machine.
Let me know how it goes.
Have a fantastic day.