Fixed SessionConnector and optimized authenticationPlugin