1. I guess that I do not understand this question.
2. Did you download the JBoss Portal source? It should be in there. (By the way, what do you mean by the "Login Portlet"? Are you really saying that you want to change how login is done for the portal? Because login is not handled by a portlet.)
Have your read the JBoss Portal documentation?
Also, this presentation might help: http://community.jboss.org/wiki/CustomPortal Finally, JBoss in Action has two chapters on the Portal and provides enough information to answer your questions.
Sorry to be so vague, but there are multiple ways to accomplish your goals, and you need to do some reading first to determine what your options are so that you can make an informed decision as to which option to take.