Added tests to check duplicate account creation and invalid login error codes. Copied Fraser's ThrowAs helper method to utils.h.