implemented the redirect to login feature and support for needAuthentication on component and view level + added UT