I see the problem.... your login name is set here: $Authenticate->Name = "user_id";
But then you save a row result with the same session variable name here: $Authenticate->storeResult("user_id", "user_id");
That is causing a conflict. One or the other has to be updated so that they are unique.