check for loginfield object before using it
also check for servicename value