Prepare a library which can give functionality for form logged in users and social users as well. Call it Connect.