Automatic login link with external login pages

Hello, i would be very gratefull if someone could help me.

I am trying to make automated login link, after the customer enables his account, so he can just click the login and hes in. I cant figure out how to make that form/link, at first i though it will be simmilar to the trial link:

<form name=\"redirect\" METHOD=\"POST\" action=\"$linklog?dst=$linkorg&username=T-$maces\">
<INPUT TYPE=\"hidden\" NAME=\"trialUser\" VALUE=$trialUser>
</form>

So i tried changing username from T-mac and adding input type password as replace of trialUser, and the router errors that he didnt receive Chap challenge. Should I send him chap-id and chap-challenge variables in form as well?

Thanks very much for replies.

http://forum.mikrotik.com/t/no-login-page-hotspot/46560/1
http://wiki.mikrotik.com/wiki/Manual:Customizing_Hotspot#HTML_customizations

Don’t escape the quotation marks with backslashes when writing HTML.

Also, this doesn’t belong into the scripting forum as it has nothing to do with the scripting language inside RouterOS.