add tests to protected resources and fix one bug
clean tabs