modified for social login functionality