refactoring servlets calling to authentication framework