Why all the quotes as in:
'"'+$userobj.loginscript+'"'

Try without quotes.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.