Fix error on successful login.

Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Merge pull request #8836 from jfrazelle/hub-login-error

Fix error on successful login.