added checklogin controller