Changed login check to be at controller level and not sub-controller
level