save the loginName by cookie