Check globally if user is logged in and redirects him to the login page if not. If the requested resource is registered within the whitelist it does nothing.