Fixes admin authentication
Rewrites generated unit tests to test code