added rest implementation for retrieving the passwords from index