Docker run Jenkins FAIL - Solution

I am setting for NOVA Codecamp and following a set of instructions for a Docker Session at this GitHub location.

Following the steps in the Preparation Section, Installed Docker (Community Edition) on my MAC at the Link provided. It was smooth.

Copied the dmg file to my Applications folder as asked and now I can see it running in my APP Bar on the top as below

Now I am trying to get Jenkins setup and used the command provided as below

docker run -d -p 49001:8080 -v $PWD/jenkins:/var/jenkins_home:z -t jenkins

It failed I got the following error.

docker run -d -p 49001:8080 -v $PWD/jenkins:/var/jenkins_home:z -t jenkins

Unable to find image 'jenkins:latest' locally

docker: Error response from daemon: Get https://registry-1.docker.io/v2/library/jenkins/manifests/latest: unauthorized: incorrect username or password.

See 'docker run --help'.

I thought since I don't have the Jenkins package it failed, so i ran the following command to pull Jenkins from Docker Store. (infact the previous command should pull Jenkins if docker couldn't find it; but it failed.)

docker pull jenkins

Using default tag: latest

Error response from daemon: Get https://registry-1.docker.io/v2/library/jenkins/manifests/latest: unauthorized: incorrect username or password

Still ERROR.

So finally the FIX for this is, for some reason when i login to my Docker instance on my MAC, with my EMAIL and PASSWORD it didn't work. I have to sign out and then login with my USERNAME and PASSWORD. Then it worked like a charm.