Implementing a logon form with JSF has been alwys a bit troublesome. This requires form input elements with input names j_username and j_password. With the JSF RI this is hard to accomplish. So you typically end up with including the Apache MyFaces Tomahawk components which offer a forceId attribute.
If you are using other popular JSF component libraries, things might get a bit more handy (you can avoid including tomahawk just for fully controlling the input ids!).
With Myfaces Trinidad (Oracle ADF Faces) it is pretty easy, ids are accepted as they are:
With JBoss Rich-Faces use the a4j:form tag: