Updated authentication/authorization

- Fixed Django authentication for is_active check
- Added tests for authentication