untested line counter code
works with user authentication