Set up Mongoose back end and persisted user to database on connecting to socket server