front-end stuff, better handling for logged in users, and a few touches to the restify module