XWiki-5406 : Implementation of persistent logins is insecure. A few bug fixes / minor ameliorations