Add tests for valid and invalid user creation and clean up displaying of the flash message