added more unit tests for register functionality