Replace InMemUserStore with a database backed version

Currently uses anorm to access the database.