in reply to problems passing value

Not directly related to your question, but I just spotted this:

if ($Session->{'isAuthenticated'} = 1)

I think you want == here.