[api][webui] fix (dummy) webui login handling

small refactoring