Added DB and Session Functionality