CAS auth

Also did some modularization of controller modules to make writing unit tests easier