Added password retrieval function