Added structure to credentials storing and fetching