Added ratings logic in User model