Cb 2188 keychain password persist

Fixed an issue where release 4.0 adds a password to the keychain and it wasn't being properly deleted from the keychain on sdk 8 + token versions. 

As well, cleaned up the error block at the bottom never being touched and added some extra curly braces for clarity.