Add password read from ndb, bug fixes