added controller for login check