Fix issue where auth failure callback might not be called with ui
thread.