current_user.agents fails if current_user == nil

If a user isn't logged in the application layout blows up.

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.