reworked functions for storing and retrieving passwords
not sure whats happening here