Add repository and authentication feature tests, slight refactor

GitHub #50