Some refactoring + signup tests