Twitter code re-factoring

parameter object examples, method re-factoring, checkUserLoggedIn check added for methods requiring user authentication.