refactoring invite friends and link to api user profile