Using filters to guard the controller

DRY using filters to guard the controller instead of repeating the
checking code in different actions.