Moved some functions into a separate user-utils.js module; moved logout route to a different URL, inside the users route.