cleaned up auth.js some more