in the changed code, It looks like some of the column names being used for setting sessions are different, and the success and failure redirects are empty.
I dont know what changes you made when editing the Authenticate user server behavior, but i am not able to reproduce a problem by opening an existing login page, reinspecting the Authenticate User Behavior, and clicking OK.