add tests to require authentication
refactoring
add PASS environment var for travis-ci to test