add unit test for forgotten password model and tidy up