Updated to handle different cas variable for login name