Now calling loginCheck() on click of log-in button.