DRYed up sessions controller