refactor loginWithBlock native method