add createAndLogin, which is used for logging of social network