changed http interface to be able to handle sessions