added methods to note_controller.js for storing latest emails to db and getting unsorted emails for client
this breaks up the get method and allows the getting of emails to work better asynchronously