For now, keep using a github userid and password.
The CS50 staff is working on a system-wide fix/replacement for this and will have it before the deadline. (as I was told by @curiouskiwi, a staff member)
If this answers your question, please click on the check mark to accept. Let's keep up on forum maintenance. ;-)
Ctrl+C will cancel whatever program the terminal is running and send you back to your directory. Without knowing what command threw you into the loop, I can't help further, but this should at least kill the loop.