made cas login more generic