Update login connect function