WEBUI: Protect against timing attacks. Closes #2108.