Adds authorization, updates tests
Merges pundit branch w master