Fixed some bugginess in user persistence

It's kind of hacky for now, this could use a refactor