Resolved issue where the previous_redirect_to_cas session entry is a string object instead of time, so, before doing any comparisons we have to call a .to_time on it