made more generic routes, pulled a sendJSON() function out of a huge ugly function, added more data to user info that is save (media count, etc.)