Fix bug in Auth::loginById that caused no action to be taken. Closes #1712.