Added events for application didBecomeActive and willResignActive
Replaced some NSLog messages by SGLog