Change session and save them automatically in the database.
Fix that subjects could not be saved.
Log mongoose errors to console.
Small API improvements.