clean up auth code in node