plugin to redirect users to login upon accessing private content - modified to return proper url when working with CAS