placed all logic in controllers and locked all pages and fixes the redirect accordingly