Added functionality to pull friends and pending friends from the
database