I become to understand what you are trying to do

If this was not what you want,please let me know:
[quote]
- You want to create multiple log in page (use for Multiple language?)
- after the user has logged in,user will be transfered to the specified domain
[/quote[
This would be easy to solve if you know what session is,heres a quick and clean tutorial for you :
http://www.phpfreaks.com/tutorials/41/0.php
After reading it(it may cost only 10 mins,believe me,but it could longer depend on ur PHP version

) you will know what to do.
Note : If you intend to do it with another host(mean sub2.domain.com point to a file in another host,i suggest you burn it out and think of a new way.