update login sample with connect