Logout before removing the cookie

The run_command was logging out the user every time, although the sessions would not clear up in the iDrac because the SID was not sent as part of the logout. This led to not being able to login for a while till the sessions timed out.