Added inital codes for session handling and ajax