user registration
login, fix Entity relationship
switch Entity.type to an enum