spms.js auth code cleanup