swift friendly enum
use rawLogin when login is not available.