diff --git a/cmd/login/helper.go b/cmd/login/helper.go
index 511f420..da3767f 100644
--- a/cmd/login/helper.go
+++ b/cmd/login/helper.go
@@ -110,6 +110,12 @@ var CmdLoginHelper = cli.Command{
 					if err != nil {
 						return err
 					}
+
+					// Once token is refreshed, get the latest from the updated config
+					refreshedConfig := config.GetLoginByHost(wants["host"])
+					if refreshedConfig != nil {
+						userConfig = refreshedConfig
+					}
 				}
 
 				_, err = fmt.Fprintf(os.Stdout, "protocol=%s\nhost=%s\nusername=%s\npassword=%s\n", host.Scheme, host.Host, userConfig.User, userConfig.Token)