Fix typo in db check

leads to wrong login state, see #134