current_user.agents fails if current_user == nil

I didn't want to mess with organization and style too much, so I didn't do a full-on refactor, but this might want to live as an AJAX call, or maybe a helper.