I am also getting this error with a blank EmonCMS setup - can’t log in at all (after registering an initial user).
EDIT: Issue fixed. I submitted pull request 931 and it has now been accepted.