centralizing logic for register (for native and facebook)