Add tests for authentication funcs