fixed the way ratings where being calculated
added devise, and changed stocks such that they belong to a user now