Fix exception if login times out

If a client attempts connection to a BMC that is not there,
unusual KeyError would get thrown.  Correct this by only
attempting to deregister the element if it is registered.

Change-Id: I3febb92ae8bc40c2847758797f179e85d58d97b1