test model and integration

added some vote logic and tests for user model