If you are deploying your SAPUI5 application into ABAP Stack, i.e., as a BSP Application, then follow the below steps:
1. Create a custom Class, inheriting class CL_ICF_SYSTEM_LOGIN
2. Redefine the method HTM_LOGIN, add your HTML code for the login page
3. Assign this class in your ICF Service of the UI5 Application under tab Error Pages->Configuration
You can also try the other approaches from the below threads:
http://scn.sap.com/thread/3631596
Regards,
Meganadhan S