Changes for AuthenticationFilter and bug Fixes.