Add some tests, abstract password hashing