fix login returned early and not trigger callback

Signed-off-by: xiehuc <xiehuc@gmail.com>
Merge branch 'upstream/dev'