[#55] Fixed tests for my auth system; minor refactorings; fixed wrong assertion