Fixing session id
Fixing php warning
Fixing php warnings