Moved everything over to require.js

Added auth.