implementing loginstatus controller for checking if the users session is still active