Using MongoClient for db authentication

Small fixes to template and back button