make test works and fix #7

- fixed the test and made them work (they weren't actually testing much, because they were async)
- fixed a bug in the reset password procedure