Tested also by setting xwiki.authentication.useip=false in xwiki.cfg, but I got the same result and the same stacktrace displayed in XWiki logs.