Added tests for username correctness and some other stuff