I really don't remember well enough to know what might be different. I don't think those lines would need to be rewritten. I think you can just set the success redirect page to the '/includes/set_sessions.php' page in the new authentication server behavior. I think as long as they both set the same session variables it should work. If not I'd need a url, steps to reproduce, and ftp access to debug it further.