Applied authorization logic to global access to app.