Working facebook login with javascript SDK