When attempting to sign in tas-portal with UAA on TAS 5.0.2 by accessing URL "tas-portal.<apps domain>", it would fail with error "Login failed; caused by PopupClosedError: Login failed, popup was closed", as shown by image below.

"cf app tas-portal" command shows this app has two routes with both apps and system domain.
$ cf app tas-portal
Showing health and status for app tas-portal in org system / space system as admin...
name: tas-portal
requested state: started
routes: tas-portal.cfapps.example.com, tas-portal.sys.example.com
The login failure is due to a bug fix in TAS 5.0.2, as described in
release note .
[Bug Fix] TAS Portal switch to the system domain