Added tests for has*, setTraits, logout. Moved stuff around in tests