Hmmmmm..
I have some experience with CGI module, but not tried CustomCGI application. I thnk you don't need separate TSessionModule.
Instead, my guess is you may define a Session within TMyCGIHandler, and create session during initialization. Anyway session data is transferred via coolkies, which are a TStrings variable of TRequest.
Anyway currently your problem seems to lie in that you have not created SessionModule.
begin
AResponse.Contents.Append('Logged in');
SessionModule.Session.Create(Nil); ////////// <-- Here, SessonModule itself is nil.
SessionModule.Session.Variables['username']:='Vimal';
{Create Session and Store User Details in Session Variable}
end