Switched name and realm positions. Make sure name and realm are not
empty, and realm is valid.