Added a git ignore file.
Restructured application, moving database interaction into a db.js. Improved session serialisation.