Add CAS log in support and update security for it