Added link form element.
Changed function name to be clearer.
Tidied comment. Start session explicitly not with magic write of variable.
Found and possibly fixed problem with forms not being serialized via the function call.