UPDATED CODE WITH FACEBOOK REGISTRATION