Add custom auth tests & solve AGJS-89

Added tests for custom authenticator and refactored authentication tests