made changes for admin to route to /admin in .js file