Added logout compability.