facebook login, templates refactor