Register new users on login via Mabel and fix SQL parse error