Logging in to iCloud
I have a 2010 MBP (OS 10.9.5) and I'm having trouble logging in to my iCloud account. Because it requires two-factor authentication, when I go to System Preferences>iCloud and enter my password, it says I need to type in the 6-digit code for verification. The code is sent to my iPhone via text, however, no window appears for me to input my code on my MBP. I tried to sign in again but a window popped up saying I was already signed in so I should delete my account from Internet Accounts and log in again. I did that, I deleted my iCloud account and tried signing in again but the problem still exists - there is no window for me to input my 6-digit verification code.
But since I deleted my iCloud account, I also use my iCloud account for my Calendar app (7.0) and all my Calendar events are gone!
Please help. What do I need to do to log in to my iCloud account?
MacBook Pro