Support multiple type for login.