I have written an authentication class controller containing a method to check login status of user, and redirect him to login page if he/she is not logged in.
I need to call this function from other controller methods to authenticate the user. What is a good way to do that?