Fix User.received_messages is broken

This fixes #72.  I created a test that reveals the SQL error in `user.rb` and subsequently fixed it by correcting the corresponding SQL in the `user.rb` file.  Please review and merge this request soon.  Thank you.