Refactored some parts of the friends api; implemented very basic user profile page