fixing errors in login check script