Running pgadmin4 produces a 401 Unauthorized page in firefox.
By using the pgAdmin 4 Tray Icon, you can browse pgAdmin 4 in the default browser.
If you want to change the browser, use configure option from the pgAdmin 4 Tray icon.
To set Firefox as a default browser for pgAdmin then provide the command as below
"<Path to firefox>" %URL%
Example: "/usr/bin/firefox" %URL%
Yeah - you can expect to see 401's if you're running pgAdmin in desktop mode, and try to connect without using the security key. Running under the runtime as Khushboo suggests should prevent that happening.
In server mode, you should always be redirected to the login page if you need to authenticate (and the security key isn't used).