added passing tests

added integration and unit test. also made some edits to user model stuff because we caught some errors..