first pass at authentication (take 2)
Merge branch 'engine-user' of https://github.com/cotrix/cotrixrep.git into engine-user