moved database functions to database.js
cleaned up server, renamed session to playlist