added password handling to persistent file