Enabled credentials encryption
Using a proper notification :
UIApplicationWillResignActiveNotification ----> UIApplicationDidEnterBackgroundNotification
removed a workaround