Using HTTP headers and session variables to make the program truly RESTful