added device table, passing tests, added relations to user and device