Thanks all for your responses,
NTDOC I tested both your login script and remote script and they both worked excellent.

I ended up using the remote script

thanks again