implement a better and tdd system for authenticating many different types of users