introduce facebook javascript api. remove server-side login and forwarding