Moved authentication to lib/Server.js
Basic error responses in dashboard client script