fix authentication dialog presented when application wakes up in background

when startManager is called, it doesn't mean  the app is actually active,
e.g. in iOS7 when a background download finished.
So check for active state in startManager and potentially wait for an
didBecomeActive notification.