rework error handling to use actual error pages within public/

for certain errors, like not being logged in, we still redirect the user, but now take into account AJAX requests and handle those gracefully
update jQuery timeago and cookie plugins