Change user handling to devise, updated tests (mostly ok)