Hello,
is your UI5 application running on HCP or on HANA XS. And if it is running on HCP, do you not wanna having something like an SSO connection with user propagation so that the user do not have to logon a second time on the HANA machine?
For the second case you can check posts Setup SAP Assertion SSO principal propagation from HCP to HANA and Principal Propagation between HTML5- or Java-based applications and SAP HANA XS on SAP HANA Cloud Platform.
Regards,
Florian