Fix if expression
Add AuthTest test case