unit tests for validation and login code