weblib: fix unauthorized detection on client