added some unit tests for login