Generate WordPress login cookie and validate it on the fly