A few small fixes plus working CAS auth